BacklinkCache was forgetting to check rd_interwiki when getting redirects, and thus...
authorBrian Wolff <bawolff@users.mediawiki.org>
Wed, 29 Jun 2011 07:19:12 +0000 (07:19 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Wed, 29 Jun 2011 07:19:12 +0000 (07:19 +0000)
some extranous backlinks for the redirect table (if there happened to be a page redirecting
to an interwiki page with the same name plus an interwiki prefix).

Not a major issue since this is really only used as far as i can tell, to purge squids and html file cache.
A couple of extra unneeded purges shouldn't hurt anything, just a bit pointless.

RELEASE-NOTES-1.19
includes/BacklinkCache.php

index 6eaac8f..39ac011 100644 (file)
@@ -130,6 +130,8 @@ production.
 * Use content language in formatting of dates in revertpage message
   (rollback revert edit summary) and do not adjust for user timezone.
 * (bug 29277) MediaWiki:Filepage.css is also shown on the local wiki
+* Make sure Backlink cache does not retrieve interwiki redirects when looking for
+  redirects to a local page.
 
 === API changes in 1.19 ===
 * BREAKING CHANGE: action=watch now requires POST and token.
index e44e19d..37d830e 100644 (file)
@@ -207,10 +207,17 @@ class BacklinkCache {
                switch ( $table ) {
                        case 'pagelinks':
                        case 'templatelinks':
+                               $conds = array(
+                                       "{$prefix}_namespace" => $this->title->getNamespace(),
+                                       "{$prefix}_title"     => $this->title->getDBkey(),
+                                       "page_id={$prefix}_from"
+                               );
+                               break;
                        case 'redirect':
                                $conds = array(
                                        "{$prefix}_namespace" => $this->title->getNamespace(),
                                        "{$prefix}_title"     => $this->title->getDBkey(),
+                                       "{$prefix}_interwiki" => '',
                                        "page_id={$prefix}_from"
                                );
                                break;